import { Get, Post } from "@/library/utils/request"
import * as types from "@/views/order_manager/order_configs/types"

export const OrderConfigsApiUrl = {
    GetAllConfig: "/Order/GetAllConfig",
    Params: "/Order/Params",
    SetConfig: "/Order/SetSyncServerConfigByServerName",
}

export const OrderConfigsApi = {
    /**
     * 获取所有配置
     */
    GetAllConfig() {
        return Get<types.DataType>(OrderConfigsApiUrl.GetAllConfig)
    },
    /**
     * 获取参数
     */
    Params() {
        return Get<types.ParamsType>(OrderConfigsApiUrl.Params)
    },
    /**
     * 获取参数
     */
    SetConfig(params: types.SetConfigType) {
        return Post(OrderConfigsApiUrl.SetConfig, params)
    },
}